package com.gopay.remote.order;

import com.gopay.common.constants.cps.PayStat;
import com.gopay.common.constants.trans.TxnStaCode;
import com.gopay.common.exception.GopayException;

/**
 * 更新付款类订单明细表
 * @PayOrderUpdateRemoteService.java
 * @author wanggang
 * @2014-11-25 上午11:44:56  www.gopay.com.cn Inc.All rights reserved.
 */
public interface PayOrderUpdateRemoteService {

    /**
     * 更新付款状态
     * @param orderId
     * @param newPayStat
     * @return
     * @throws GopayException
     */
    boolean updatePayStat(String gopayOrderId, PayStat newPayStat) throws GopayException;
    
    /**
     * 更新主订单交易状态及付款订单付款状态
     * @param orderId
     * @param newPayStat
     * @return
     * @throws GopayException
     */
    boolean updateOrderStatAndPayStat(String gopayOrderId, PayStat newPayStat, TxnStaCode newTxnStat) throws GopayException;

    /**
     * 更新自动结算对账状态
     * @param gopayOrderId
     * @param asCoStatus
     * @return
     * @throws GopayException
     */
    boolean updateAsCoStat(String gopayOrderId, String asCoStatus) throws GopayException;
    
}
